//
//  MyBankCardTableViewCell.m
//  wangzhe
//
//  Created by 李 佳伟 on 2017/10/19.
//  Copyright © 2017年 李 佳伟. All rights reserved.
//

#import "MyBankCardTableViewCell.h"
#import "JTCSM.h"

@interface MyBankCardTableViewCell (){
    MyBankCardView *view;
}

@end
@implementation MyBankCardTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        self.contentView.backgroundColor = RGBACOLOR(241, 241, 241, 1);
        CGFloat space = 20;
        view  = [[MyBankCardView alloc]initWithFrame:CGRectMake(space, 15, KSCREENWidth-2*space, 0)];
        [self.contentView addSubview:view];
    }
    
    return self;
}

- (void)setvalueWithBankCardModel:(MyBankCardModel *)model{
    if (model == nil) {
        return;
    }
    view.bankCardLabel.text = model.bank_name;
    view.bankNamebLabel.text = model.bank_card;
    view.dateLabel.text = model.period;
    view.timeLabel.text = model.cvn2;
    
}

@end
